package backstage.app.entity.layui;


import java.io.Serializable;
@SuppressWarnings("all")
public class LayEdit<T> implements Serializable {

    /**
	 * 
	 */
	private static final long serialVersionUID = -335636820357438335L;

	private int code;

    private String msg;

    private layuiImg data;


    public LayEdit(int code, String msg,String src,String title) {
        this.code = code;
        this.msg = msg;
        this.data = new layuiImg(src,title);
    }

    public LayEdit() {
    }

    public LayEdit(String msg, layuiImg data) {
        this.msg = msg;
        this.data = data;
    }

    public static <T>LayEdit<T> ok( String src, String title){

        return new LayEdit(0,"图片上传成功",src,title);
    }
     
	 
	public static <T>LayEdit<T> fall(  String src, String title){

        return new LayEdit(1,"图片上传失败",src,title);
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public layuiImg getData() {
        return data;
    }

    public void setData(layuiImg data) {
        this.data = data;
    }

    @Override
    public String toString() {
        return "LayEdit{" +
                "code=" + code +
                ", msg='" + msg + '\'' +
                ", data=" + data +
                '}';
    }
}
